Skip to content

fix(cli): snapshot --publish skips when nothing changed - #58

Merged
Madraka merged 1 commit into
mainfrom
fix/snapshot-unchanged
Oct 21, 2026
Merged

Madraka merged 1 commit into
mainfrom
fix/snapshot-unchanged

Conversation

@Madraka

@Madraka Madraka commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Closes #51.

cloudhal snapshot --publish with no changes against the live snapshot now makes no new snapshot and prints nothing changed since <id> (live); no new snapshot. The check is the store's pendingChanges (the same diff the publish approval shows), so the site node's own publish pointer does not count as a change. snapshot without --publish still always records one (an explicit checkpoint).

  • packages/cli/src/commands/snapshot.ts: unchangedLive; snapshot() returns the live snapshot with unchanged: true (type SnapshotResult, still a Snapshot for callers).
  • cli/commands-local.ts: the message.
  • test/e2e.test.ts: a second publish returns the same id, unchanged.

Checked on a test site: two runs in a row both say nothing changed.

🤖 Generated with Claude Code

…e snapshot

Re-running a setup script made a new snapshot every time, padding the
history. With --publish and no pending changes against the live snapshot
(the store's pendingChanges, which ignores the site node's publish pointer),
the command now returns the live snapshot and prints
"nothing changed since <id> (live); no new snapshot".

Closes #51

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Madraka <[email protected]>
@Madraka
Madraka merged commit 123a487 into main Oct 21, 2026
4 checks passed
@Madraka
Madraka deleted the fix/snapshot-unchanged branch October 21, 2026 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

snapshot --publish when nothing changed

1 participant